package org.afi.mushroomplayer.model;

import android.os.Parcel;
import android.os.Parcelable;

public class SongInfo implements Parcelable {

	private String title;
	private String artist;
	private String album;
	private String size;
	private String url;
	private int duration;
	private int index;

	public SongInfo() {

	}

	public SongInfo(Parcel read) {
		title = read.readString();
		artist = read.readString();
		album = read.readString();
		size = read.readString();
		url = read.readString();
		duration = read.readInt();
		index = read.readInt();
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getArtist() {
		return artist;
	}

	public void setArtist(String artist) {
		this.artist = artist;
	}

	public String getSize() {
		return size;
	}

	public void setSize(String size) {
		this.size = size;
	}

	public String getAlbum() {
		return album;
	}

	public void setAlbum(String album) {
		this.album = album;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public int getDuration() {
		return duration;
	}

	public void setDuration(int duration) {
		this.duration = duration;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		// TODO Auto-generated method stub
		dest.writeString(title);
		dest.writeString(artist);
		dest.writeString(album);
		dest.writeString(size);
		dest.writeString(url);
		dest.writeInt(duration);
		dest.writeInt(index);
	}

	public static final Parcelable.Creator<SongInfo> CREATOR = new Parcelable.Creator<SongInfo>() {

		@Override
		public SongInfo createFromParcel(Parcel source) {
			return new SongInfo(source);
		}

		@Override
		public SongInfo[] newArray(int size) {
			return new SongInfo[size];
		}
	};
}
